import intiaData from '../state'

function productsReducer(state=intiaData.products,action){
  switch (action.type){
    case "addproduct":
            let product2=action.product
            return [...state,product2]
        default:
            return state
  }
}
export default productsReducer